package com.zjq.smartdevice.controller.advices;

import com.zjq.smartdevice.dto.R;
import com.zjq.smartdevice.service.SysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @User zhangjiaqi
 * @Project project
 * @Package com.zjq.smartdevice.controller.advices
 * @Date 2022/3/27 15:56
 */
@RestController
@RequestMapping("/menus")
public class MenuController {

    private SysMenuService sysMenuService;

    @Autowired
    public void setSysMenuService(SysMenuService sysMenuService) {
        this.sysMenuService = sysMenuService;
    }

    @GetMapping("/menus")
    public R findAllLeftMenu() {
        return R.setOK(sysMenuService.findAllLeftMenu());
    }
}
